//
//  InputVC.m
//  SmartEstateCC
//
//  Created by Steven on 2019/6/23.
//  Copyright © 2019 pretang. All rights reserved.
//

#import "InputVC.h"




@interface InputVC ()
@property (weak, nonatomic) IBOutlet UITextField *houseTF;
@property (weak, nonatomic) IBOutlet UITextField *cellTF;
@property (weak, nonatomic) IBOutlet UITextField *roomTF;



@end

@implementation InputVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationController setNavigationBarHidden:NO];
    
}

- (IBAction)saveAction:(UIButton *)sender {
    [self.view endEditing:YES];
    
    NSString *houseNo = self.houseTF.text;
    if (houseNo.length == 0) {
//        [self.view showInfo:@"请填写楼栋号"];
        return;
    }
    
   
    NSString *cellNo = self.cellTF.text;
    if (cellNo.length == 0) {
//        [self.view showInfo:@"请填写单元号"];
        return;
    }
    
    NSString *roomNo = self.roomTF.text;
    if (roomNo.length == 0) {
//        [self.view showInfo:@"请填写门牌号"];
        return;
    }
    
    !self.onCompleted ?: self.onCompleted(houseNo, cellNo, roomNo);
    
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}



@end
